cmake_minimum_required(VERSION 3.0.0)
project(3dRe VERSION 0.1.0)
set (CMAKE_CXX_STANDARD 11)
include(CTest)
enable_testing()
find_package(OpenMVG REQUIRED)

add_executable(3dRe main.cpp)
# gomp is used in features 
target_link_libraries(3dRe 
${OPENMVG_LIBRARIES}  
PUBLIC
openMVG_system
openMVG_image
openMVG_sfm
openMVG_stlplus
openMVG_features
openMVG_multiview
vlsift
jpeg
png
tiff
AKAZE
gomp
${OPENMVG_LIBRARY_DEPENDENCIES}
PRIVATE
${JPEG_LIBRARIES}
${PNG_LIBRARIES}
${TIFF_LIBRARIES})

add_executable(3dRe_two_img sfm_two_img.cpp)
# gomp is used in features 
target_link_libraries(3dRe_two_img
${OPENMVG_LIBRARIES}  
PUBLIC
openMVG_system
openMVG_image
openMVG_sfm
openMVG_matching
vlsift
openMVG_stlplus
openMVG_features
openMVG_multiview
jpeg
png
tiff
AKAZE
gomp
${OPENMVG_LIBRARY_DEPENDENCIES}
PRIVATE
${JPEG_LIBRARIES}
${PNG_LIBRARIES}
${TIFF_LIBRARIES})

target_include_directories(3dRe
    PUBLIC
    ${OPENMVG_INCLUDE_DIRS}
  PRIVATE
    ${JPEG_INCLUDE_DIR}
    ${PNG_INCLUDE_DIRS}
    ${TIFF_INCLUDE_DIR}
)
target_include_directories(3dRe_two_img
    PUBLIC
    ${OPENMVG_INCLUDE_DIRS}
  PRIVATE
    ${JPEG_INCLUDE_DIR}
    ${PNG_INCLUDE_DIRS}
    ${TIFF_INCLUDE_DIR}
)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
